<template>
	<view v-if="isLoaded">
		<li-report height="600" :param.sync="param" :reportData="tableData" :columns="columns" :isShowLoadMore="isShowLoadMore">
			<li-summary-cards
				:summaryData="[
					{
						title: `菜品收入(元)`,
						value: summaryObj.allAmount
					},
					{
						title: `菜品销售额(元)`,
						value: summaryObj.amount
					},
					{
						title: `菜品销售数量`,
						value: summaryObj.quantity
					},
					{
						title: `菜品优惠金额(元)`,
						value: summaryObj.discountAmount
					}
				]"
			/>
		</li-report>
	</view>
</template>

<script>
import date from '@/utils/date';
import LiReportMixin from '../../../mixins/liReportMixin.js';
export default {
	mixins: [LiReportMixin],
	data() {
		return {
			isShowLoadMore: true,
			reportFn: 'GetPageReport',
			param: {
				dataTimeRange: [date.getToday(), date.getToday()],
				pageNum: 1,
				pageSize: 20,
				reportId: 101
			},
			columns: [
				{
					name: 'orderNo',
					label: '订单号',
					fixed: true
				},
				{
					name: 'foodName',
					label: '菜品名称',
					fixed: false
				},
				{
					name: 'specName',
					label: '规格名称',
					fixed: false
				},
				{
					name: 'foodCategoryName',
					label: '菜品分类',
					fixed: false
				},
				{
					name: 'price',
					label: '原价',
					fixed: false
				},
				{
					name: 'realPrice',
					label: '实价',
					fixed: false
				},
				{
					name: 'discountAmount',
					label: '优惠金额',
					fixed: false
				},
				{
					name: 'ralAmount',
					label: '实收金额',
					fixed: false
				},
				{
					name: 'taskAmount',
					label: '做法加价',
					fixed: false
				},
				{
					name: 'feedAmount',
					label: '加料加价',
					fixed: false
				}
			]
		};
	}
};
</script>
